<?

require_once ("application.list.inc");

global $_GLOBAL_DBH;
global $_OBJECT_IFACE_PANEL;

$indexes = array (
	last=>array (label=>"Last",order=>"DEFAULT",wrapper=>"vmc_icon_person"),
	first=>array (label=>"First",order=>"DEFAULT"),
	name=>array (label=>"UserID",order=>"DEFAULT",wrapper=>"vmc_icon_user"),
	realm=>array (label=>"Realm",order=>"DEFAULT",wrapper=>"vmc_icon_realm"),
	access=>array (label=>"Access",order=>"DEFAULT",wrapper=>"vmc_icon_access",
			options=>array (
				"public"=>"Public",
				"private"=>"Private",
				"exclusive"=>"Exclusive",
			)),
	cdate=>array (label=>"Create Date",order=>"DEFAULT",wrapper=>"vmc_icon_date"),
);

$object_ctl = "/admin/accounts/objects/fs_objects.php?fs_action=view&fs_tab=users&fs_tab_option=fs_users&object_id={$_REQUEST["object_id"]}&";
$link_options = "&fs_action=view&fs_tab=users&object_id={$_REQUEST["object_id"]}";
$list_options = array (
	array (
		label=>"Modify A User",
		link=>"fs_objects.php?fs_action=addnew&fs_tab=users&fs_tab_option=fs_users&object_id={$_REQUEST["object_id"]}",
	),
);

$_OBJECT_IFACE_LIST = _app_create_list_object (array (
                db_conn=>$_GLOBAL_DBH,
                indexes=>$indexes,
		list_count=>"SELECT COUNT(*) FROM object_users_view WHERE object_id={$_REQUEST["object_id"]}",
		list_select=>"SELECT * FROM object_users_view WHERE object_id={$_REQUEST["object_id"]}",
                list_id=>"lc_object_users",
                list_options=>$list_options,
                primary_key=>"id",
                primary_relation=>"user_id",
                link_options=>$link_options,
                object_ctl=>$object_ctl
));


$_OBJECT_IFACE_TABBING_PANEL->insert_container ($_OBJECT_IFACE_LIST);

?>
